#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;
int main()
{
	long long a, b, n;
	long long ans = 1;
	cin >> a >> b >> n;
	long long num[7] = { b,a,a,a,a,a,b };
	long long nums = a * 5 + b * 2;
	if (n > nums) {
		ans += (n / nums) * 7;
		n = n % nums;
	}
	while (n > 0)
	{
		n -= num[ans % 7];
		ans++;
	}
	cout << ans - 1;
}
